//Created by JIAN HUA
Ext.define("MajorProjectSenchaTouch.view.NewArrivals.NewArrivalsSelectType",{
    extend: 'Ext.Panel',
    xtype: 'typeselect',
	id: 'Selecttype',
    requires: [
    'Ext.Label'
    ],
    config:{
          
        layout: [{
            type: 'hbox'
        }],
		loop: true,
        items:[
        {
            xtype: 'panel',
            id: 'NewresultSortWrapper',
            items:[
         
            {
                xtype: 'label',
                id: 'resultsummaryBtn'
            },
            {
                xtype: 'selectfield',
                id: 'selecttypeField',
                ui: 'light',
                usePicker: true,
			
               
                field: 'Filter',
               
              
                options: [
                {
                    text: 'New Books',
                    value: 'newshelfbooks'
                },
                {
                    text: 'New eBooks',
                    value: 'nebooks'
                },
                {
                    text: 'New AV & Multimedia Resources',
                    value: 'AVitems'
                },
                {
                    text: 'New Fiction',
                    value: 'novels'
                },
                {
                    text: 'New in Red Spot',
                    value: 'redspot'
                },
				
				
                ],
/*
|--------------------------------------------------------------------------
| (@author : Joanna Tan)
|--------------------------------------------------------------------------
|
| When the picker value change it will call goSelectedType in NewArrivals
| Controller to sort the results. 
|
// */
                listeners:{
                    change: function(select, newValue, oldValue){
                        var searchController = MajorProjectSenchaTouch.app.getController('NewArrivals');
                        searchController.goSelectedType();
                    }
               
                }
            }
            

              
            
        ]
        }]
    }
});